package com.api.user.model;

import java.io.Serializable;
import java.math.BigDecimal;
import javax.persistence.*;

@Table(name = "coupon_user")
public class CouponUser implements Serializable {
    @Id
    @Column(name = "coupon_user_id")
    private Long couponUserId;

    @Column(name = "coupon_id")
    private Long couponId;

    @Column(name = "user_id")
    private Long userId;

    /**
     * 过期时间
     */
    @Column(name = "validity_time")
    private Long validityTime;

    /**
     * 领取时间
     */
    @Column(name = "receive_time")
    private Long receiveTime;

    /**
     * 最终优惠金额
     */
    @Column(name = "coupon_amount")
    private BigDecimal couponAmount;

    /**
     * 验证码 10位随机 不能重复
     */
    @Column(name = "coupon_code")
    private String couponCode;

    /**
     * 是否使用
     */
    private Boolean status;

    private static final long serialVersionUID = 1L;

    /**
     * @return coupon_user_id
     */
    public Long getCouponUserId() {
        return couponUserId;
    }

    /**
     * @param couponUserId
     */
    public void setCouponUserId(Long couponUserId) {
        this.couponUserId = couponUserId;
    }

    /**
     * @return coupon_id
     */
    public Long getCouponId() {
        return couponId;
    }

    /**
     * @param couponId
     */
    public void setCouponId(Long couponId) {
        this.couponId = couponId;
    }

    /**
     * @return user_id
     */
    public Long getUserId() {
        return userId;
    }

    /**
     * @param userId
     */
    public void setUserId(Long userId) {
        this.userId = userId;
    }

    /**
     * 获取过期时间
     *
     * @return validity_time - 过期时间
     */
    public Long getValidityTime() {
        return validityTime;
    }

    /**
     * 设置过期时间
     *
     * @param validityTime 过期时间
     */
    public void setValidityTime(Long validityTime) {
        this.validityTime = validityTime;
    }

    /**
     * 获取领取时间
     *
     * @return receive_time - 领取时间
     */
    public Long getReceiveTime() {
        return receiveTime;
    }

    /**
     * 设置领取时间
     *
     * @param receiveTime 领取时间
     */
    public void setReceiveTime(Long receiveTime) {
        this.receiveTime = receiveTime;
    }

    /**
     * 获取最终优惠金额
     *
     * @return coupon_amount - 最终优惠金额
     */
    public BigDecimal getCouponAmount() {
        return couponAmount;
    }

    /**
     * 设置最终优惠金额
     *
     * @param couponAmount 最终优惠金额
     */
    public void setCouponAmount(BigDecimal couponAmount) {
        this.couponAmount = couponAmount;
    }

    /**
     * 获取验证码 10位随机 不能重复
     *
     * @return coupon_code - 验证码 10位随机 不能重复
     */
    public String getCouponCode() {
        return couponCode;
    }

    /**
     * 设置验证码 10位随机 不能重复
     *
     * @param couponCode 验证码 10位随机 不能重复
     */
    public void setCouponCode(String couponCode) {
        this.couponCode = couponCode;
    }

    /**
     * 获取是否使用
     *
     * @return status - 是否使用
     */
    public Boolean getStatus() {
        return status;
    }

    /**
     * 设置是否使用
     *
     * @param status 是否使用
     */
    public void setStatus(Boolean status) {
        this.status = status;
    }
}